package com.example.backend.dto;

import com.example.backend.domain.enums.TicketPriority;
import com.example.backend.domain.enums.TicketStatus;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.Instant;

/**
 * 更新工单请求DTO
 */
@Data
public class UpdateTicketRequest {
    @Size(max = 200, message = "工单标题长度不能超过200个字符")
    private String title;

    @Size(max = 2000, message = "工单描述长度不能超过2000个字符")
    private String description;

    @Size(max = 5000, message = "详细描述长度不能超过5000个字符")
    private String descriptionDetail;

    private Long categoryId;
    
    private TicketPriority priority;
    
    private TicketStatus status;
    
    private Long assignedToId;
    
    private Long customerId;
    
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    private Instant dueDate;
    
    private BigDecimal estimatedHours;
    
    private BigDecimal actualHours;
    
    private Integer satisfactionScore;
    
    @Size(max = 1000, message = "满意度评价长度不能超过1000个字符")
    private String satisfactionComment;
    
    private String internalNotes;
    
    private Boolean isPublic;
    
    private Boolean isEscalated;
    
    private String escalationReason;
}
